'''
Created on 2013-1-11

@author: hanchen
'''
# encoding: utf-8

from zheezes.util import chkuser

from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app

class MainPage(webapp.RequestHandler):
    def get(self):
        username = self.request.get("username")
        result = chkuser.str_error(chkuser.is_fb_user(username))
        #print username
        self.response.headers['Content-Type'] = 'text/plain'
        self.response.out.write(result)
        #self.response.out.write(username)

application = webapp.WSGIApplication([('/.*', MainPage)], debug=True)

def main():
    run_wsgi_app(application)

if __name__ == "__main__":
    main()
